From: Christian Hergert Date: Tue, 31 May 2022 22:58:21 +0000 (-0700) Subject: builderparser: fix with interface types X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~81^2^2~150^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=63e9e7e8997543827161d288648b2d8b4b95e439;p=gtk4.git builderparser: fix with interface types If we have a a runtime warning would be emitted and the expression would fail to be created. This is because the interfaces will likely be a GObject as well, meaning we check the object type branch instead of the interface. Instead, we need to use the fundamental type like other parts of the expression system use. --- diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index ccfb1cbc56..c2afb64579 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -1409,13 +1409,13 @@ expression_info_construct (GtkBuilder *builder, return NULL; } - if (g_type_is_a (type, G_TYPE_OBJECT)) + if (g_type_fundamental (type) == G_TYPE_OBJECT) { GObjectClass *class = g_type_class_ref (type); pspec = g_object_class_find_property (class, info->property.property_name); g_type_class_unref (class); } - else if (g_type_is_a (type, G_TYPE_INTERFACE)) + else if (g_type_fundamental (type) == G_TYPE_INTERFACE) { GTypeInterface *iface = g_type_default_interface_ref (type); pspec = g_object_interface_find_property (iface, info->property.property_name);